<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }

        #app{
            width: 100%;

        }
        header,footer{
            background-color: #eee;
            height: 40px;
            line-height: 40px;
            text-align: center;
            width: 100%;
            clear: both;
        }
        main{ 
            padding-left: 400px;
            padding-right: 300px;
        }
        .left,.center,.right{
            float: left;
        }
        .left{
            background-color: yellow;
            color: #000;
            text-align: center;
            width: 400px;
            margin-left: -100%;
            position: relative;
            right: 400px;
        }
        .right{
            background-color: green;
            color: #fff;
            text-align: center;
            width: 300px;
            margin-right: -100%;
            
        }
        .center{
            background-color: skyblue;
            color: #fff;
            width: 100%;

        }
        /* .bfc{
            overflow: hidden;
        } */
        /* 手写clearfix */
        .clearfix::after{
            content: "";
            display: table;
            clear: both;
        }
    </style>
</head>
<body>
    <div id="app">
        <header>
            我是头部
        </header>
        <main class="clearfix">
            <div class="center ">我是内容。。。。。</div>
            <div class="left ">我是左边的侧边栏</div>
            <div class="right ">我是右边的广告位</div>
        </main>
        <footer>
            我是尾部
        </footer>
    </div>
</body>
</html>